<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />

<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta name="decorator" content="default" />
<title>添加任务</title>
</head>
<body>
	<script>
	$(document).ready(function() {
		$('#tackSaveFom').bootstrapValidator();
	});
		var datatable;
		//保存
		function save(){
			if (!$('#tackSaveFom').data('bootstrapValidator').validate().isValid()) {
				return;
			}
			Otod.ajax({
				url : "${ctx}/pm/task/saveTask.do",
				data : $('#tackSaveFom').serialize(),
				contentType : "application/x-www-form-urlencoded;",
				successFn : function() {
					Otod.Msg.info("保存成功");

				}
				
			});
		}
		//加载所有的 数据
		$(document).ready(function() {
			
			
		});	

		
	</script>
	<div class="row">
		<div class="col-sm-12">
			<h3 class="header smaller lighter blue">
				<small>任务管理</small>
			</h3>
				<h3 class="header smaller lighter blue">
					<small style="margin-left: 2%">新增</small>
				</h3>
				<div class="row">
					<h3 class="header smaller lighter blue">
						<small style="margin-left: 3%">添加任务</small>
					</h3>
					<form class="form-horizontal" role="form" name="tackSaveFom"
						id="tackSaveFom" action="" method="get">
						<div class="col-sm-4">
							<label for="q_tackName" class="col-sm-5 control-label input-sm">任务名称</label>
							<div class="col-sm-7">
								<input type="text" name="taskName" id="taskName" placeholder="任务名称">
							</div>

						</div>
						<div class="col-md-4">
							<label for="empName" class="col-md-5 control-label input-sm">任务类型</label>
							<div class="col-md-7">
								<select id="taskType" name="taskType">
									<option>文档类</option>
									<option>附件类</option>
								</select>
							</div>
						</div>
						<div class="col-md-4">
							<label for="empName" class="col-md-5 control-label input-sm">归属项目</label>
							<div class="col-md-7">
								<input type="text" class="form-control input-sm" id="prjId"
									name="prjId" placeholder="归属项目">
							</div>
						</div>
						<div class="col-md-4">
							<label for="empName" class="col-md-5 control-label input-sm">归属阶段</label>
							<div class="col-md-7">
								<input type="text" class="form-control input-sm" id="stepId"
									name="stepId" placeholder="归属阶段">
							</div>
						</div>
						<div class="col-md-4">
							<label for="empName" class="col-md-5 control-label input-sm">开始日期</label>
							<div class="col-md-7">
								<input type="time" class="form-control input-sm" id="startDate1"
									name="startDate1" placeholder="开始日期">
							</div>
						</div>
						<div class="col-md-4">
							<label for="empName" class="col-md-5 control-label input-sm">结束日期</label>
							<div class="col-md-7">
								<input type="time" class="form-control input-sm" id="endDate2"
									name="endDate2" placeholder="结束日期">
							</div>
						</div>
						
						
						
						<div class="col-sm-4" style="margin-left: 300px">
							<button class="btn btn-xs btn-success" type="button"
								onclick="save()" style="margin-left: 30%">
								<i class="icon-save"></i>新增
							</button>
						</div>
					</form>
				</div>
			</div>
		</div>
		<br>
		<br>
		<table id="roleTable" class="table table-striped table-bordered table-hover">
						<thead>
							<tr>
								<th width="20%">任务名称</th>
								<th width="20%">开始时间</th>
								<th width="20%">结束时间</th>
								<th width="20%">状态</th>
							</tr>
						</thead>
						<tbody>
						</tbody>
					</table>

</body>